<?php

namespace App\Kuafu\Invoice\Enum;

use App\Kuafu\Base\Enum\BaseCodeEnum;

class InvoiceCodeEnum extends BaseCodeEnum
{
    const PREFIX_TOKEN = 'moredo:appid:';

    const ERR_GET_TOKEN            = 420001;
    const ERR_APPLY_INVOICE        = 420002;
    const ERR_SHOP_NO_INVOICE_DATA = 420003;
    const ERR_NO_NAME              = 420004;
    const ERR_IP_LIST              = 420005;
    const ERR_UPLOAD_URL           = 420006;
    const ERR_CANCEL_URL           = 420007;
    const ERR_CANCEL               = 420008;
    const ERR_ANALYSIS             = 420009;
    const ERR_INSERT               = 420010;
    const ERR_NO_ORDER             = 420011;
    const ERR_EXIST_RED_ORDER      = 420012;
    const ERR_SHOP_NOT_INVOICE     = 420013;
    const ERR_RED_INVOICE_CALLBACK = 420014;
    const ERR_ENCRYPT              = 420015;
    const ERR_GET_ENCRYPT          = 420016;
    const ERR_DUPLICATE_INVOICE    = 420017;
    const ERR_MONEY                = 420018;
    const ERR_ADD_DEVICE           = 420019;
    const ERR_INTI                 = 420020;
    const ERR_CAN_NOT_USE_QA       = 420021;

    const CODE_TEXT = [
        self::ERR_GET_TOKEN            => '获取盟度token失败',
        self::ERR_APPLY_INVOICE        => '申请开票失败',
        self::ERR_SHOP_NO_INVOICE_DATA => '该店铺暂时不能开票',
        self::ERR_NO_NAME              => '请输入对接商名称',
        self::ERR_IP_LIST              => '请输入ip白名单，多个用逗号隔开',
        self::ERR_UPLOAD_URL           => '请输入开票回调url',
        self::ERR_CANCEL_URL           => '请输入撤销开票回调url',
        self::ERR_CANCEL               => '取消开票失败',
        self::ERR_ANALYSIS             => '开票回调解析失败',
        self::ERR_INSERT               => '开票回调入库失败',
        self::ERR_NO_ORDER             => '订单不存在',
        self::ERR_EXIST_RED_ORDER      => '已经取消过，不可再次取消',
        self::ERR_SHOP_NOT_INVOICE     => '当前店铺未绑定开票服务',
        self::ERR_RED_INVOICE_CALLBACK => '红冲回调修改失败',
        self::ERR_ENCRYPT              => '加解密失败',
        self::ERR_GET_ENCRYPT          => '获取解密信息失败',
        self::ERR_DUPLICATE_INVOICE    => '您已经开过发票，请勿重重复申请',
        self::ERR_MONEY                => '金额小于0元，不支持开发票',
        self::ERR_ADD_DEVICE           => '添加税盘失败',
        self::ERR_INTI                 => '初始化失败',
        self::ERR_CAN_NOT_USE_QA       => 'QA环境不允许开票',
    ];
}
